{include file="public/header" /}
<form class="layui-form" style="padding:0 20%;">
	<div class="layui-tab">
		<ul class="layui-tab-title">
			<li class="layui-this">个人信息</li>
			<li>密码信息</li>
			<li>其它信息</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<div style="padding:15px;">
					<label class="layui-form-label">账户</label>
					<div class="layui-input-block">
						<div class="layui-form-label" style="color:#f05050;text-align:left;width:100%;">{$aUser['account']}</div>
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">说明</label>
					<div class="layui-input-block">
						<div class="layui-form-label" style="width:100%;text-align:left;color:#999;">账户用于登录系统的账号，不能修改</div>
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">姓名</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="name" placeholder="请输入真实姓名" value="{$aUser['name']}">
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">手机号</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="mobile" placeholder="请输入手机号" value="{$aUser['mobile']}">
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">QQ号</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="qq" placeholder="请输入QQ号" value="{$aUser['qq']}">
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">性别</label>
					<div class="layui-input-block">
						<input type="radio" name="sex" value="1" title="男" {$aUser['status']==1?'checked':''}>
						<input type="radio" name="sex" value="2" title="女" {$aUser['status']==2?'checked':''}>
					</div>
				</div>
			</div>
			<div class="layui-tab-item">
				<div style="padding:15px;">
					<label class="layui-form-label">老密码</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="old_pw" placeholder="请输入老密码，不修改不填写">
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">新密码</label>
					<div class="layui-input-block">
						<input type="text" class="layui-input" name="new_pw" placeholder="请输入新密码，不修改不填写">
					</div>
				</div>
			</div>
			<div class="layui-tab-item">
				<div style="padding:15px;">
					<label class="layui-form-label">登陆次数</label>
					<div class="layui-input-block">
						<div class="layui-form-label" style="text-align:left;width:100%;">{$aUser['times_login']}次</div>
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">注册时间</label>
					<div class="layui-input-block">
						<div class="layui-form-label" style="text-align:left;width:100%;">{:date('Y-m-d H:i:s',$aUser['time_add'])}</div>
					</div>
				</div>
				<div style="padding:15px;">
					<label class="layui-form-label">登陆时间</label>
					<div class="layui-input-block">
						<div class="layui-form-label" style="text-align:left;width:100%;">{:date('Y-m-d H:i:s',$aUser['time_last'])}</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</form>
<div class="layui-form-item" style="margin-top:10px;">
	<div class="layui-input-block" style="text-align:center;">
		<button type="button" class="layui-btn" onclick="save()">保存</button>
	</div>
</div>
<script type="text/javascript">
	layui.use(['layer','form','element'],function(){
		var form = layui.form;
		element = layui.element;
		layer = layui.layer;
		$ = layui.jquery;
	});
	function save(){
		$.post("{$config['admin_route']}bewadmin/admininfo",$('form').serialize(),function(res){
			if(res.code>0){
				layer.msg(res.msg,{'icon':2});
			}else{
				layer.msg(res.msg,{'icon':1});
				setTimeout(function(){parent.window.location.reload();},1000);
			}
		},'json');
	}
</script>
{include file="public/tail" /}